{extend name="public/base" /} {block name="body"}
<div class="ibox float-e-margins">
	<div class="content-tabs">
			<ol class="breadcrumb">
				<li>
					<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
				</li>
				<li><strong>提现申请</strong></li>
			</ol>
	</div>	
	<div class="ibox-content">
		<ul class="nav nav-tabs">
			<li id="li-bar-busi">
				<a href="{:url('applyrec')}">商家T+1提现申请</a>
			</li>
			<li id="li-bar-busis">
				<a href="{:url('applyrecs')}">商家D+0提现申请</a>
			</li>
			<li id="li-bar-member">
				<a href="{:url('memapplyrec')}">会员提现申请</a>
			</li>
		</ul>
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('memapplyrec')}">
		<div class="row">
			<span class="bspan">会员名称</span><input type="text" id="name" name="name" value="" placeholder="请输入会员名称" class="bank"/>
 			<select class="bank" name="type">
 				<option value="0">请选择提现类型</option>
                <option value="1">D+0</option>
                <option value="2">T+1</option>
           </select>
			<span class="bspan">添加时间</span><input type="text" id='start_time' name='start_time' onclick='WdatePicker()'  placeholder="开始时间" class="bank" />
	            <input type="text" id='end_time' name='end_time' onclick='WdatePicker()'  placeholder="结束时间" class="bank" />          		
			<span ><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
			<a href="#" onclick="check()" class="btn btn-primary btn-outline">导出信息</a></span>
        </div>
        </form>
        <div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                            	<th class="text-center">会员名称</th>
								<th class="text-center">手机号</th>
								<th class="text-center">提现金额</th>
								<th class="text-center">实际到帐金额</th>
								<th class="text-center">手续费</th>
								<th class="text-center">提现类型</th>
								<th class="text-center">提现账户</th>
								<th class="text-center">开户行支行</th>
								<th class="text-center">户名</th>
								<th class="text-center">提现时间</th>
								<th class="text-center">处理时间</th>	
                            </tr>
                        </thead>
                        <tbody id="list" class="text-center">
                        	{volist name="list" id='ad'}
                        	<tr id="tx_{$ad.id}">
                        		<td><a href="#" onclick="open_renz('{$ad.uid}')" >{$ad.nick_name}</a></td>
                        		<td>{$ad.mobile}</td>
                        		<td>{$ad.balance}</td>
								<td>{$ad.actual_balance}</td>
								<td>{$ad.counter_fee}</td>
								<td>
									{if $ad.type == 1}
									D+0
									{elseif $ad.type == 2}
									T+1
									{/if}
								</td>
								<td>{$ad.card_no}</td>
								<td>{$ad.bank_account}</td>
								<td>{$ad.bank_username}</td>
								<td>{$ad.createtime}</td>
                        	    <td>	
                        			<a href="{:url('memapplyedit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
									<i class="fa fa-paste"></i> 处理</a>
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<script>
	$("#li-bar-member").addClass("active");
	var surl="adminmall/paylog/applyrec";
	setMenu(surl);
	function check(){
		var name = $('#name').val();
		var type = $('#type').val();
		var start_time = $('#start_time').val();
		var end_time = $('#end_time').val();
		window.location.href = "/adminmall/paylog/memapplydc.html?name="+ name+"&type="+ type+"&start_time="+ start_time+"&end_time="+ end_time;
	}
	function open_renz(id){
		var html="";
		$.ajax({
			type:"post",
			data:{member_id:id},
			url:"get_member",
			success:function(data){
				var member=data.member;
				html='<div class="ibox float-e-margins">'+
				'<div><h4 style="color:red;text-align:center;">已认证</h4></div>'+
					'<div class="ibox-content">'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">姓名：</label>'+
						'<div class="input-group col-sm-4">'+member.nick_name+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">提交时间：</label>'+
						'<div class="input-group col-sm-4">'+member.sq_time+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">开户行：</label>'+
						'<div class="input-group col-sm-4">'+member.bank_account+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">卡号：</label>'+
						'<div class="input-group col-sm-4">'+member.card_no+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">开户人：</label>'+
						'<div class="input-group col-sm-4">'+member.bank_username+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">预留手机号：</label>'+
						'<div class="input-group col-sm-4">'+member.bank_mobile+'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">身份证正面照：</label>'+
						'<div class="input-group col-sm-4">'+
							'<img src="'+member.card_img+'" style="width: 200px;" />'+
						'</div>'+
					'</div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">身份证反面照：</label>'+
						'<div class="input-group col-sm-4">'+
							'<img src="'+member.card1+'" style="width: 200px;" />'+
						'</div>'+
					'</div>'+
					'<div class="hr-line-dashed"></div>'+
					'<div class="form-group">'+
						'<label class="col-sm-4 control-label">个人半身照：</label>'+
						'<div class="input-group col-sm-4">'+
							'<img src="'+member.card2+'" style="width: 200px;" />'+
						'</div>'+
					'</div>'+
			'</div>'+
		'</div>';
				layer.open({
				title: '提现认证查看',
				area: ['750px', '600px'],
				scrollbar: false,
				btn:false,
				content: html
				});
			}
		});		
	}
	
</script>
{/block}